public class Main {

	public static void main(String[] args) {

		//Voir si on peut seed et leech en meme temps

		//Voir si on refait un listen -> on ne change pas la key mais on change la taille (normalement impossible) -> KO ?

		Bdd bdd=new Bdd();		

		bdd.newListeningSeeder("2aze34523",4000,3,"0.0.0.0",50,"toto.exe");
		bdd.newListeningSeeder("224aze",234,3,"1.0.0.0",50,"toto.exe");
		bdd.newListeningSeeder("224aze",234,3,"1.0.0.0",50,"tata.exe");
		bdd.newListeningSeeder("223aze",500060,3,"1.0.0.0",50,"toto.exe");
		bdd.newListeningSeeder("22azerrarze1234",90001,3,"1.0.0.0",50,"toto.exe");
		bdd.newListeningSeeder("2434",22424,43,"0.0.0.0",50,"titi.exe");
		bdd.newListeningSeeder("254",2242,3,"0.0.0.0",50,"toto.exe");
		bdd.newListeningSeeder("26578",256,3,"0.0.0.0",50,"toto.exe");
		bdd.newListeningSeeder("2azert12",224,3,"2.0.0.0",50,"toto.exe");
		bdd.newListeningSeeder("2azert12",2646,3,"4.0.0.0",50,"toto.exe");
		bdd.newListeningSeeder("2azert12",234534,3,"0.0.0.0",40,"tata.exe");
		bdd.newListeningLeecher("2azert12","0.0.0.0",40);
		bdd.newListeningLeecher("30azerae234ze2","0.0.0.0",1400);
		bdd.newListeningLeecher("224aze","0.0.0.0",22);
		bdd.newListeningLeecher("224aze","0.0.0.0",22);

		Bdd bddcopy=bdd;
		bddcopy.newListeningLeecher("224aze","1.1.1.1",32);
		bdd.printKey();		
		System.out.println();
		bddcopy.printKey();

		System.out.println();
	//	System.out.println(bdd.findKeyFromFileName("toto.exe").printResearch());

		System.out.println();
		//System.out.println(bdd.findKeyFromSizeOver(9000).printResearch());

		System.out.println();
		//System.out.println(bdd.printIp("2azert12"));
/*
		System.out.println(bdd.answer("look [  filename=\"toto.exe\" filesize>\"9000\"]","0.0.0.0"));

		System.out.println(bdd.answer("getfile 2azert12","0.0.0.0"));
		
		System.out.println(bdd.answer("announce listen 2222 seed [ file_0.dat   2097152  1024   8905e92afeb80fc7722ec89eb0bf0966   file_b.dat   3145728 1536		 330a57722ec8b0bf09669a2b35f88e9e   ] leech [330a57722ec8b0bf09669a2b35f88e9e 330a57722ec8b0bf09669a2b3 ]","13234.123.234.3456"));
		System.out.println(bdd.answer("look [filename=\"file_0.dat\"]","0.0.0.0"));
		System.out.println(bdd.answer("announce listen 1233 seed [ ]","0.0.0.0"));
		System.out.println(bdd.answer("update seed [ 234sdf ZEOFK123O ] leech [] ","0.0.0.0"));
		announce listen 2222 seed [file_0.dat 2097152 1024 8905e92afeb80fc7722ec89eb0bf0966 file_b.dat 3145728 1536 330a57722ec8b0bf09669a2b35f88e9e] leech [330a57722ec8b0bf09669a2b35f88e9e 330a57722ec8b0bf09669a2b3]
		announce listen 1234 seed [toto.exe 30 1024 1123 file_b.dat 3145728 1536 330a57722ec8b0bf09669a2b35f88e9e] leech [8905e92afeb80fc7722ec89eb0bf0966 330a57722ec8b0bf09669a2b3]
look [filename="file_0.dat"]

	*/
	}
}
